<template>
  <div id="engineeringProgress">
    <engineeringProgressTable
      v-if="key == 1"
      class="engineeringProgressTable"
      :getKey="getKey"
    ></engineeringProgressTable>

    <engineeringProgressFrom
      v-if="key == 2"
      :getKey="getKey"
      :planId="planId"
      style="margin: 0 auto; width: 95%"
    ></engineeringProgressFrom>
  </div>
</template>

<script>
import engineeringProgressFrom from './engineeringProgressFrom.vue'
import engineeringProgressTable from './engineeringProgresstable.vue'

export default {
  data() {
    return {
      key: 1,
      planId: '',
    }
  },
  components: {
    engineeringProgressFrom,
    engineeringProgressTable,
  },
  created() {},
  methods: {
    getKey(key, id) {
      this.key = key
      this.planId = id
    },
  },
}
</script>

<style lang="less" scoped>
#engineeringProgress {
  height: 100%;
  width: 100%;
}
</style>
